.class public Lcom/waiqin365/compons/c/c;
.super Ljava/lang/Object;


# static fields
.field private static h:Lcom/waiqin365/compons/c/c;


# instance fields
.field private a:Landroid/telephony/TelephonyManager;

.field private b:Landroid/telephony/gsm/GsmCellLocation;

.field private c:Landroid/telephony/cdma/CdmaCellLocation;

.field private d:I

.field private e:Ljava/lang/String;

.field private f:Ljava/lang/String;

.field private g:Ljava/util/ArrayList;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Lcom/waiqin365/compons/c/c;

    invoke-direct {v0}, Lcom/waiqin365/compons/c/c;-><init>()V

    sput-object v0, Lcom/waiqin365/compons/c/c;->h:Lcom/waiqin365/compons/c/c;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/compons/c/c;->g:Ljava/util/ArrayList;

    return-void
.end method

.method public static declared-synchronized a()Lcom/waiqin365/compons/c/c;
    .locals 2

    const-class v0, Lcom/waiqin365/compons/c/c;

    monitor-enter v0

    :try_start_0
    sget-object v1, Lcom/waiqin365/compons/c/c;->h:Lcom/waiqin365/compons/c/c;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method


# virtual methods
.method public a(Landroid/content/Context;)Lcom/waiqin365/compons/c/b;
    .locals 7

    const/4 v6, 0x0

    const/4 v4, 0x5

    const/4 v1, 0x0

    const/4 v5, 0x3

    const-string/jumbo v0, "phone"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    iput-object v0, p0, Lcom/waiqin365/compons/c/c;->a:Landroid/telephony/TelephonyManager;

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->a:Landroid/telephony/TelephonyManager;

    if-nez v0, :cond_0

    move-object v0, v1

    :goto_0
    return-object v0

    :cond_0
    invoke-static {}, Landroid/telephony/CellLocation;->requestLocationUpdate()V

    new-instance v2, Lcom/waiqin365/compons/c/b;

    invoke-direct {v2}, Lcom/waiqin365/compons/c/b;-><init>()V

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->a:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getCellLocation()Landroid/telephony/CellLocation;

    move-result-object v0

    if-nez v0, :cond_1

    move-object v0, v1

    goto :goto_0

    :cond_1
    instance-of v3, v0, Landroid/telephony/gsm/GsmCellLocation;

    if-eqz v3, :cond_9

    check-cast v0, Landroid/telephony/gsm/GsmCellLocation;

    iput-object v0, p0, Lcom/waiqin365/compons/c/c;->b:Landroid/telephony/gsm/GsmCellLocation;

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->b:Landroid/telephony/gsm/GsmCellLocation;

    invoke-virtual {v0}, Landroid/telephony/gsm/GsmCellLocation;->getLac()I

    move-result v0

    iput v0, p0, Lcom/waiqin365/compons/c/c;->d:I

    const-string/jumbo v0, ""

    iget-object v1, p0, Lcom/waiqin365/compons/c/c;->a:Landroid/telephony/TelephonyManager;

    if-eqz v1, :cond_2

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->a:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperator()Ljava/lang/String;

    move-result-object v0

    :cond_2
    if-eqz v0, :cond_4

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-lt v1, v5, :cond_3

    invoke-virtual {v0, v6, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    :cond_3
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-lt v1, v4, :cond_4

    invoke-virtual {v0, v5, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/compons/c/c;->f:Ljava/lang/String;

    :cond_4
    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    if-eqz v0, :cond_5

    const-string/jumbo v0, ""

    iget-object v1, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_6

    :cond_5
    const-string/jumbo v0, "460"

    iput-object v0, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    :cond_6
    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->f:Ljava/lang/String;

    if-eqz v0, :cond_7

    const-string/jumbo v0, ""

    iget-object v1, p0, Lcom/waiqin365/compons/c/c;->f:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_8

    :cond_7
    const-string/jumbo v0, "phone"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSubscriberId()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_8

    const-string/jumbo v1, "460"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_8

    invoke-virtual {v0, v5, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/compons/c/c;->f:Ljava/lang/String;

    :cond_8
    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->b:Landroid/telephony/gsm/GsmCellLocation;

    invoke-virtual {v0}, Landroid/telephony/gsm/GsmCellLocation;->getCid()I

    move-result v0

    iput v0, v2, Lcom/waiqin365/compons/c/b;->a:I

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    iput-object v0, v2, Lcom/waiqin365/compons/c/b;->b:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->f:Ljava/lang/String;

    iput-object v0, v2, Lcom/waiqin365/compons/c/b;->c:Ljava/lang/String;

    iget v0, p0, Lcom/waiqin365/compons/c/c;->d:I

    iput v0, v2, Lcom/waiqin365/compons/c/b;->d:I

    const-string/jumbo v0, "gsm"

    iput-object v0, v2, Lcom/waiqin365/compons/c/b;->e:Ljava/lang/String;

    move-object v0, v2

    goto/16 :goto_0

    :cond_9
    instance-of v2, v0, Landroid/telephony/cdma/CdmaCellLocation;

    if-eqz v2, :cond_d

    check-cast v0, Landroid/telephony/cdma/CdmaCellLocation;

    iput-object v0, p0, Lcom/waiqin365/compons/c/c;->c:Landroid/telephony/cdma/CdmaCellLocation;

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v0}, Landroid/telephony/cdma/CdmaCellLocation;->getSystemId()I

    move-result v2

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v0}, Landroid/telephony/cdma/CdmaCellLocation;->getBaseStationId()I

    move-result v3

    iget-object v0, p0, Lcom/waiqin365/compons/c/c;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v0}, Landroid/telephony/cdma/CdmaCellLocation;->getNetworkId()I

    move-result v4

    if-gez v3, :cond_a

    move-object v0, v1

    goto/16 :goto_0

    :cond_a
    new-instance v0, Lcom/waiqin365/compons/c/b;

    invoke-direct {v0}, Lcom/waiqin365/compons/c/b;-><init>()V

    iput v3, v0, Lcom/waiqin365/compons/c/b;->a:I

    iput v4, v0, Lcom/waiqin365/compons/c/b;->d:I

    const-string/jumbo v1, ""

    iget-object v3, p0, Lcom/waiqin365/compons/c/c;->a:Landroid/telephony/TelephonyManager;

    if-eqz v3, :cond_b

    iget-object v1, p0, Lcom/waiqin365/compons/c/c;->a:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getNetworkOperator()Ljava/lang/String;

    move-result-object v1

    :cond_b
    if-eqz v1, :cond_c

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v3

    if-lt v3, v5, :cond_c

    invoke-virtual {v1, v6, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    :cond_c
    const-string/jumbo v1, "460"

    iput-object v1, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/compons/c/c;->e:Ljava/lang/String;

    iput-object v1, v0, Lcom/waiqin365/compons/c/b;->b:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/waiqin365/compons/c/b;->c:Ljava/lang/String;

    const-string/jumbo v1, "cdma"

    iput-object v1, v0, Lcom/waiqin365/compons/c/b;->e:Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/compons/c/c;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v1}, Landroid/telephony/cdma/CdmaCellLocation;->getBaseStationLatitude()I

    move-result v1

    int-to-long v2, v1

    iget-object v1, p0, Lcom/waiqin365/compons/c/c;->c:Landroid/telephony/cdma/CdmaCellLocation;

    invoke-virtual {v1}, Landroid/telephony/cdma/CdmaCellLocation;->getBaseStationLongitude()I

    move-result v1

    int-to-long v4, v1

    invoke-virtual {v0, v2, v3, v4, v5}, Lcom/waiqin365/compons/c/b;->a(JJ)V

    goto/16 :goto_0

    :cond_d
    move-object v0, v1

    goto/16 :goto_0
.end method
